package cn.cdu.medical.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;

@Data
@Schema(description = "处方明细请求对象")
public class PrescriptionDetailDTO {

    @Schema(description = "药品ID")
    @NotBlank(message = "药品ID不能为空")
    private String medicineId;

    @Schema(description = "药品名称")
    @NotBlank(message = "药品名称不能为空")
    private String medicineName;

    @Schema(description = "规格")
    @NotBlank(message = "规格不能为空")
    private String specification;

    @Schema(description = "单位")
    @NotBlank(message = "单位不能为空")
    private String unit;

    @Schema(description = "数量")
    @NotNull(message = "数量不能为空")
    @Positive(message = "数量必须大于0")
    private BigDecimal amount;

    @Schema(description = "用法")
    @NotBlank(message = "用法不能为空")
    private String usageMethod;

    @Schema(description = "频次")
    @NotBlank(message = "频次不能为空")
    private String frequency;

    @Schema(description = "用药天数")
    @NotNull(message = "用药天数不能为空")
    @Positive(message = "用药天数必须大于0")
    private Integer days;

    @Schema(description = "单次剂量")
    @NotNull(message = "单次剂量不能为空")
    @Positive(message = "单次剂量必须大于0")
    private BigDecimal singleDose;

    @Schema(description = "总剂量")
    @NotNull(message = "总剂量不能为空")
    @Positive(message = "总剂量必须大于0")
    private BigDecimal totalDose;

    @Schema(description = "备注")
    private String notes;
} 